from pathlib import Path
import os


def test():
	absolute_path = False
	only_dirs = True
	# print(dir(os.walk("./")))
	# print()
	for root, dirs, files in os.walk("./"):
		print(f"root = {root}, dirs = {dirs}, files = {files}")
		# for entry in dirs if only_dirs else files:
		# 	if absolute_path:
		# 		print(os.path.abspath(os.path.join(root, entry)))
		# 	else:
		# 		print(os.path.join(root, entry))	


def test2():
	path = ".\\"
	only_files = True

	entries = os.listdir(path)
	for entry in entries:
		full_path = os.path.join(path, entry)
		print(full_path)
		print(entry)
		if os.path.isdir(full_path) and (not only_files):
			print(full_path)


def test3():
	path = "/some/path/with/slashes"
	normalized_path = os.path.normpath(path)
	print(normalized_path)
	# windows_path = normalized_path.replace('/', '\\')
	# print(windows_path)

def test4():
	for root, dirs, files in os.walk("./", topdown=True):
		print(f"dirs = {dirs}")
		print(f"files = {files}")

	    # for name in files:
	    #     print(os.path.join(root, name))
	    # for name in dirs:
	    #     print(os.path.join(root, name))

def test5():
	path = Path('./')
	for entry in path.iterdir():
	    if entry.is_file():
	        # print(entry.name)
	        pass
	    elif entry.is_dir():
	        print(entry.name)


def rec(path):
	for p in path.iterdir():
		print(p)
		if p.is_dir():
			rec(p)




if __name__ == '__main__':
	rec(Path("./"))